import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
export const useUserStore = defineStore(
	'user',
	() => {
		const token = ref(0)
		const userId = ref('')
		const redirectURL = ref('/pages/index/index')
		const openType = ref('switchTab')
		return {
			token,
			userId,
			redirectURL,
			openType
		}
	},
	{
		persist: {
			paths: ['token', 'userId', 'redirectURL', 'openType'],
			key:'__persistedstate__user'
		},
	}
)
